package com.cxhc.system.service.app.impl;

import java.util.List;
import com.cxhc.common.utils.DateUtils;
import com.cxhc.system.domain.app.RpDuty;
import com.cxhc.system.mapper.app.RpDutyMapper;
import com.cxhc.system.service.app.IRpDutyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 执勤检查Service业务层处理
 * 
 * @author Dhq
 * @date 2024-09-24
 */
@Service
public class RpDutyServiceImpl implements IRpDutyService
{
    @Autowired
    private RpDutyMapper rpDutyMapper;

    /**
     * 查询执勤检查
     * 
     * @param id 执勤检查主键
     * @return 执勤检查
     */
    @Override
    public RpDuty selectRpDutyById(Long id)
    {
        return rpDutyMapper.selectRpDutyById(id);
    }

    /**
     * 查询执勤检查列表
     * 
     * @param rpDuty 执勤检查
     * @return 执勤检查
     */
    @Override
    public List<RpDuty> selectRpDutyList(RpDuty rpDuty)
    {
        return rpDutyMapper.selectRpDutyList(rpDuty);
    }

    /**
     * 新增执勤检查
     * 
     * @param rpDuty 执勤检查
     * @return 结果
     */
    @Override
    public int insertRpDuty(RpDuty rpDuty)
    {
        return rpDutyMapper.insertRpDuty(rpDuty);
    }

    /**
     * 修改执勤检查
     * 
     * @param rpDuty 执勤检查
     * @return 结果
     */
    @Override
    public int updateRpDuty(RpDuty rpDuty)
    {
        rpDuty.setUpdateTime(DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS));
        return rpDutyMapper.updateRpDuty(rpDuty);
    }

    /**
     * 批量删除执勤检查
     * 
     * @param ids 需要删除的执勤检查主键
     * @return 结果
     */
    @Override
    public int deleteRpDutyByIds(Long[] ids)
    {
        return rpDutyMapper.deleteRpDutyByIds(ids);
    }

    /**
     * 删除执勤检查信息
     * 
     * @param id 执勤检查主键
     * @return 结果
     */
    @Override
    public int deleteRpDutyById(Long id)
    {
        return rpDutyMapper.deleteRpDutyById(id);
    }
}
